package com.example.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author :蕉绿
 * @Date : 2023/2/15 22:48
 * @Version : V1.0
 * @Description :
 */
@RestController
@Slf4j
public class TestController {

    //读取配置文件中的
    @Value("${count}")
    private String s1;


    @Autowired
    private Student student;

    @RequestMapping("/student")
    public Student getStudent() {
        return student;
    }

    @RequestMapping("/cn")
    public String getS() {
        log.error("error!");
        return s1;
    }
}
